/**
 * @className AnnouncementServiceImpl
 * @author liuxuelin
 * @Date 2021/1/18
 * @version v1.0
 */

package com.hidt.shop.service.impl;

import com.hidt.shop.domain.Announcement;
import com.hidt.shop.mapper.AnnouncementMapper;
import com.hidt.shop.service.AnnouncementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AnnouncementServiceImpl implements AnnouncementService {
    @Autowired
    private AnnouncementMapper announcementMapper;
    @Override
    public int addAnnouncement(Announcement announcement) {
        int i = announcementMapper.addAnnouncement(announcement);
        return i;
    }

    @Override
    public List<Announcement> findAll() {
        System.out.println("findAll run");
        List<Announcement> announcementAll = announcementMapper.findAll();
        return announcementAll;
    }

    @Override
    public List<Announcement> findAll2(int noticeis_delete) {
        List<Announcement> announcementAll = announcementMapper.findAll2(noticeis_delete);
        return announcementAll;
    }

    @Override
    public int updateAnnouncement(Announcement announcement) {
        int i = announcementMapper.updateAnnouncement(announcement);
        return i;
    }

    @Override
    public int updateAnnouncement2(Announcement announcement) {
        int i = announcementMapper.updateAnnouncement2(announcement);
        return i;
    }


}
